package service

import (
	"github.com/gin-gonic/gin"
	"github.com/starmotioncf/common/payment/dukpay"
	"github.com/starmotioncf/common/payment/ogood"
	"github.com/starmotioncf/common/payment/payermax"
	"github.com/starmotioncf/common/payment/paypal"
	"github.com/starmotioncf/common/payment/v5pay"
	"github.com/starmotioncf/soutchatinternal/dto"
)

type PaymentConfig struct {
	Paypal     paypal.Config
	Payermax   payermax.Config
	V5pay      v5pay.Config
	Ogood      ogood.Config
	Dukpay     dukpay.Config
	ReturnPage string `help:"h5支付完成后返回页面" default:""`
}

type PaymentService interface {
	//GetPaymentMethods 获取支付方式，方式包含产品列表，要根据是否代理判断
	//GetPaymentMethods(ctx *gin.Context, isAgent bool, req *dto.PaymentMethodReq) (res []*dto.PaymentMethodItem, err error)
	// CreateOrder 创建订单，要根据是否代理判断
	CreateOrder(ctx *gin.Context, isAgent bool, req *dto.PaymentCreateOrderReq) (res *dto.PaymentCreateOrderRes, err error)
	// QueryOrder 查询订单支付状态
	QueryOrder(ctx *gin.Context, req *dto.PaymentQueryOrderReq) (res *dto.PaymentQueryOrderRes, err error)
	// Return PayPal支付回调地址，在重定向到前段页面
	Return(ctx *gin.Context) string
	// Notify 回调通知
	Notify(ctx *gin.Context) error
}
